<%-- 
    Document   : checkUpdateTest
    Created on : Nov 4, 2009, 5:16:13 PM
    Author     : khanhlv_b00554
--%>

<%@page contentType="text/html" pageEncoding="UTF-8" import="java.sql.*,DAO.*"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
<%
            int id = Integer.parseInt(request.getParameter("id"));
            Test check = new Test();

%>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link rel="stylesheet" type="text/css" media="screen" href="css/admin.css">

        <title>JSP Page</title>
    </head>
    <body>
        <div align="center" s>
            <table border="1" width="600" class="sample">
                <tr>
                    <td>
                        <p align="center">&nbsp;</p>
                        <%
                            String txtSubSubject = request.getParameter("txtSubSubject");
                            boolean checkTest = check.updateTestCheck(id);
                            if(checkTest == true)
                            {
                        %>
                        <meta http-equiv="Refresh" Content="5; url=viewTest.jsp?txtSubSubject=<%=txtSubSubject%>">
                        <p align="center" class="Warring">Bạn không thể sửa bài Test này vì đã có người thi ! Xin hãy đợi để vể trang chủ ...</p>
                        <p align="center"><div align="center"><img src="images/working.gif"></div></p>
                        <p align="center"> <a href="viewTest.jsp?txtSubSubject=<%=txtSubSubject%>">Click here</a></p>
                        <%
                            } else {
                        %>
                        <meta http-equiv="Refresh" Content="5; url=updateTest.jsp?id=<%=id%>&txtSubSubject=<%=txtSubSubject%>">
                        <p align="center" class="Warring">Bạn có thể sửa bài Test đó ! Xin hãy đợi ...</p>
                        <p align="center"><div align="center"><img src="images/working.gif"></div></p>
                        <p align="center"> <a href="updateTest.jsp?id=<%=id%>&txtSubSubject=<%=txtSubSubject%>">Click here</a></p>
                        <%
                            }
                        %>
                    </td>
                </tr>
            </table>
        </div>

        <p align="center">&nbsp;</p>

    </body>
</html>
